package com.deer.wms.base.system.service.box.impl;

import com.deer.wms.base.system.dao.box.BoxItemBacthMapper;
import com.deer.wms.base.system.model.box.BoxItemBacth;
import com.deer.wms.base.system.service.box.BoxItemBacthService;
import com.deer.wms.common.core.service.AbstractService;
import com.deer.wms.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BoxItemBacthServiceImpl extends AbstractService<BoxItemBacth, Integer> implements BoxItemBacthService {
    @Autowired
    private BoxItemBacthMapper boxItemBacthMapper;

    @Override
    public BoxItemBacth findBoxItemBacthById(Integer batchId) {
        return boxItemBacthMapper.findBoxItemBacthById(batchId);
    }

    @Override
    public BoxItemBacth findByBatchName(String batchName) {
        return boxItemBacthMapper.findByBatchName(batchName);
    }

    @Override
    public List<BoxItemBacth> findBoxItemBacthList(BoxItemBacth boxItemBacth) {
        return boxItemBacthMapper.findBoxItemBacthList(boxItemBacth);
    }

    @Override
    public int delectBoxItemBacthByIds(String batchIds) {
        return boxItemBacthMapper.delectBoxItemBacthByIds(Convert.toStrArray(batchIds));
    }

    @Override
    public int UpdateBoxItemBacth(BoxItemBacth boxItemBacth) {
        return boxItemBacthMapper.UpdateBoxItemBacth(boxItemBacth);
    }

    @Override
    public int saveBoxItemBacth(BoxItemBacth boxItemBacth) {
        return boxItemBacthMapper.saveBoxItemBacth(boxItemBacth);
    }
}
